/*
 * @Author: H.
 * @Date: 2021-12-07 15:13:45
 * @LastEditTime: 2021-12-10 16:49:43
 * @Description:
 */
import { IDataType } from '../../types'
import hyRequest from '@/service'

export function getPageListData(
  url: string,
  // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
  queryInfo: any
): Promise<IDataType> {
  return hyRequest.post<IDataType>({
    url,
    data: queryInfo
  })
}

export function deletePageData(url: string) {
  return hyRequest.delete<IDataType>({
    url
  })
}

export function createPageData(url: string, data: any) {
  return hyRequest.post<IDataType>({
    url,
    data
  })
}

export function editPageData(url: string, data: any) {
  return hyRequest.patch<IDataType>({
    url,
    data
  })
}
